package com.dhkj.web.idf.model;

import android.os.Parcel;
import android.os.Parcelable;

public class User implements Parcelable {
    /*

        "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJhcHBsaWNhdGlvblBLIjowLCJleHAiOjE2MjE5NzgzODQsInVzZXJQSyI6MiwiZGV2aWNlUEsiOjI5fQ.9XPKgR2RwEPfOAmvIyTNS4Q6eSqDT9pz0S5-51GEqqU",
        "imageUrl": null,
        "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJhcHBsaWNhdGlvblBLIjowLCJleHAiOjE2MjI3OTkxODQsInVzZXJQSyI6MiwiZGV2aWNlUEsiOjI5fQ.calCopfqpNaeJPJcL-SMUNWkDSmJGKuOW0WdXDke6Kc",
        "userId": "admin",
        "userName": "管理员",
        "userPK": 2
     */
    private String accessToken;
    private String imageUrl;
    private String refreshToken;
    private String userId;
    private String userName;
    private int userPK;
    private String password;

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getUserPK() {
        return userPK;
    }

    public void setUserPK(int userPK) {
        this.userPK = userPK;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public User() {
    }



    protected User(Parcel in) {
        userPK = in.readInt();
        accessToken = in.readString();
        imageUrl = in.readString();
        refreshToken = in.readString();
        userId = in.readString();
        userName = in.readString();
        password = in.readString();
    }

    public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
        @Override
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(userPK);
        parcel.writeString(accessToken);
        parcel.writeString(imageUrl);
        parcel.writeString(refreshToken);
        parcel.writeString(userId);
        parcel.writeString(userName);
        parcel.writeString(password);
    }
}
